require('dotenv').config();
let mongoose = require('mongoose')

mongoose
    .connect(process.env.MONGODB_URI)
    .then(()=>{
        console.log('MongoDB连接成功')
    })
    .catch((err)=>{
        console.error('MongoDB连接失败:', err)
    })

module.exports = mongoose